import QtQuick
import QtQuick.Controls.Material

Dialog{
    id: dialog
    width: 760
    height: 670
    anchors.centerIn: Overlay.overlay
    // standardButtons: Dialog.Ok | Dialog.Cancel
    closePolicy: Popup.NoAutoClose

    property string dialog_FontColor: "black"
    property string dialog_FontData: "测试文本内容!!!"
    property real dialog_FontSize:  Cpp_Config.Language_Type === 1 ? 35 :  Cpp_Config.Language_Type === 1 ? 30 : 30

    property var backGradientColor: Gradient {
        orientation: Gradient.Vertical
        GradientStop { position: 0.0 ; color: "#FFFFFF"}
        GradientStop { position: 0.5 ; color: "#1E90FF"}
        GradientStop { position: 1.0 ; color: "#FFFFFF"}
    }


    // onAccepted: {
    //     // console.log("点击 OK")
    // }

    // onRejected: {
    //     // console.log("点击 取消")
    // }

    background: Rectangle{

        gradient:  backGradientColor
        border.width: 1
        border.color: "#F0F8FF"
    }

    header: Text{
        text: dialog.title
        font.pixelSize: 30
        font.bold: true
        padding: 10
    }

    Rectangle{
        anchors.centerIn: parent
        width: parent.width * 0.8
        height: parent.height * 0.8
        color: "transparent"

        Text{
            anchors.centerIn: parent
            font.pixelSize: dialog_FontSize
            font.bold: true
            color: dialog_FontColor
            text: qsTr(dialog_FontData)
        }

    }

    Item{
        anchors.fill: parent

        A_Button{
            id: cancel
            anchors.bottom: parent.bottom
            anchors.right: parent.right
            buttonWidth: 100
            buttonHeight: 70
            contentText_Data: qsTr("取 消")

            onButtonClicked: {
                dialog.rejected()
                dialog.close()
            }

        }
        A_Button{
            id: accept
            anchors.bottom: parent.bottom
            anchors.left: parent.left
            buttonWidth: 100
            buttonHeight: 70
            contentText_Data: qsTr("确 认")

            onButtonClicked: {
                dialog.accepted()
                dialog.close()
            }

        }

    }




}
